package com.wtwd.campus.fjryE15.entity.dto;

import com.wtwd.campus.fjryE15.untils.XyyUtiils;
import com.wtwd.campus.wx.utils.AESUtils;
import org.apache.commons.lang.StringUtils;

/**
 * @author mjy
 * @date 2022/09/26
 * @description
 */
public class UnbindStudentCardDto {

    private String appId;

    private String time;

    private String randomStr;

    private String sign;

    private String imei;

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getRandomStr() {
        return randomStr;
    }

    public void setRandomStr(String randomStr) {
        this.randomStr = randomStr;
    }

    public String getSign() {
        return sign;
    }

    public void setSign(String sign) {
        this.sign = sign;
    }

    public String getImei() {
        if (StringUtils.isNotBlank(imei)){
            return AESUtils.deCode(imei, XyyUtiils.APP_KEY);
        }
        return imei;
    }

    public void setImei(String imei) {
        this.imei = imei;
    }

    @Override
    public String toString() {
        return "UnbindStudentCardDto{" +
                "appId='" + appId + '\'' +
                ", time='" + time + '\'' +
                ", randomStr='" + randomStr + '\'' +
                ", sign='" + sign + '\'' +
                ", imei='" + imei + '\'' +
                '}';
    }
}
